package com.dy.lock.screen.dao.impl;

import java.util.Map;

import org.springframework.stereotype.Repository;

import com.dy.lock.screen.dao.MaterialCommentDao;
import com.dy.lock.screen.pojo.MaterialCommentInfo;

@Repository("materialCommentDao")
public class MaterialCommentDaoImpl extends
		BaseDaoImpl<MaterialCommentInfo, String> implements MaterialCommentDao {

	@Override
	public String getQueryNamespace() {
		return "mybatis.xml.MaterialCommentMapper";
	}

	@Override
	public MaterialCommentInfo queryByPrimaryKey(String commentId) {
		return this.getSqlSession().selectOne(
				getQueryNamespace() + ".selectByPrimaryKey", commentId);
	}

	@Override
	public MaterialCommentInfo queryCommentDetail(Map<String, Object> para) {
		// TODO Auto-generated method stub
		return this.getSqlSession().selectOne(
				getQueryNamespace() + ".queryCommentDetail", para);
	}

	@Override
	public int falseDelete(MaterialCommentInfo maComentInfo) {
		// TODO Auto-generated method stub
		return this.getSqlSession().update(
				getQueryNamespace() + ".falseDelete", maComentInfo);
	}

}
